package com.longer.demo.framework.config;

import com.longer.demo.framework.interceptor.SecurityInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;

/**
 * @program: demo
 * @description:
 * @author: SunBiaoLong
 * @create: 2019-01-07 17:30
 **/
@Configuration
public class WebConfig extends WebMvcConfigurationSupport{
	@Override
	protected void addInterceptors(InterceptorRegistry registry) {
		registry.addInterceptor(new SecurityInterceptor()).addPathPatterns("/**");
		super.addInterceptors(registry);
	}
}
